import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/components/Main'
import Login from '@/components/Login'
import StuInfo from '@/components/view/StuInfo'
import ChorseCourse from '@/components/view/student/ChorseCourse'
import CourseTable from '@/components/view/student/CourseTable'
import StudentCourse from '@/components/view/student/StudentCourse'
import StudentScore from '@/components/view/student/StudentScore'
import StudentInfo from '@/components/view/student/StudentInfo'
import GradeScore from '@/components/view/teacher/GradeScore'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/Main',
      name: 'Main',
      component: Main,
      children:[
        {
          path: '/',
          name: 'StuInfo',
          component: StuInfo
        },
        {
          path: '/ChorseCourse',
          name: 'ChorseCourse',
          component: ChorseCourse
        },
        {
          path: '/StudentCourse',
          name: 'StudentCourse',
          component: StudentCourse
        },
        {
          path: '/CourseTable',
          name: 'CourseTable',
          component: CourseTable
        },
        {
          path: '/StudentScore',
          name: 'StudentScore',
          component: StudentScore
        },
        {
          path: '/StudentInfo',
          name: 'StudentInfo',
          component: StudentInfo
        },
        {
          path: '/GradeScore',
          name: 'GradeScore',
          component: GradeScore
        }
      ]
    }
  ]
})
